'''
3.2.2 输出数据
'''
from pprint import pprint

# pprint.pprint(object, stream=None, indent=1, width=80, depth=None, *, compact=False)

test = [1, 2, [3, 4, [5, 6, 7], 8], 9 ,10]

# 限制打印层级最多2层
pprint(test, depth=2)
# 一行最大字符数为5, 4格缩进
pprint(test, width=5, indent=4)
# 单个对象，width无效
pprint('1234567', width=5)